package com.mg.jsfapp.singleton;

public class ClassSingle {

   private static ClassSingle INSTANCE = new ClassSingle();

   private ClassSingle() {
      if (INSTANCE != null) {
         throw new IllegalStateException("Already instantiated");
      }
   }

   public ClassSingle getInstance() {
      return INSTANCE;
   }

   private int x;

   public void setX(int x) {
      this.x = x;
   }

   public int getX() {
      return this.x;
   }
}
